<?php session_start();
	if ($_SESSION['username'] == ''){
		header('Location: index.php?ACTION=SESSION_TIMEOUT');
	}
?>
<!DOCTYPE HTML>
<html>
<head>
	<?php require_once('header.php');?>
</head>
<body>
<div id="container">
        <div id="header">
        	<h1> Retail Managment System </h1>
        	<div id="section0">
            	Welcome <?=$_SESSION['username']?>, |
	    		<a href="?action=USERACCOUNTUPDATE">Account Settings</a> |  
    			<a href="index.php?ACTION=LOGOUT">Log Out</a>
        	</div>            
        </div>
        <div id="nav_menu"><?php require_once('nav_menu.php'); ?></div>
        <div id="workspace">        	
        	<?php			
	        	$action = $_GET['action'];				
				switch ($action){
					case 'USERACCOUNTUPDATE': include ('p_userAccount.php'); break;											
					case 'FINANCIALMANAGMENT': include ('modules/finManagement.php'); break;
					case 'ONMAINTENANCE': include ('onMaintenance.html'); break;
				}
			?>
		</div>
    </div>
</body>
</html>